function showTip(sms) {
  wx.showToast({
    title: sms,
    icon: 'none',
  })
}

function showSuccess(sms) {
  wx.showToast({
    title: sms,
    icon: 'success',
  })
}

function showModal(c, t, fun) {
  if (!t)
    t = '提示'
  wx.showModal({
    title: t,
    content: c,
    showCancel: false,
    success: fun
  })
}

function showLoading() {
  wx.showLoading({
    title: '加载中...',
  })
}

function closeLoading() {
  wx.hideLoading();
}

function loadingError() {
  wx.showToast({
    title: '加载失败',
  })
}

module.exports.showTip = showTip;
module.exports.showModal = showModal;
module.exports.showLoading = showLoading;
module.exports.loadingError = loadingError;
module.exports.closeLoading = closeLoading;
module.exports.showSuccess = showSuccess;